# !/usr/bin/env python
__author__ = 'kenzhaoyihui'

import socket

s= socket.socket(socket.AF_INET, socket.SOCK_STREAM)

s.bind(('127.0.0.1', 9998))
s.listen(2)
while True:
	print "my server is running..."
	print "waiting for connect..."
	conn, addr = s.accept()
	while True:
		conn.send("I am server!")
		strrev = conn.recv(1024)
		print strrev
s.close()